/* 
 * File:   tree_view_context_menu.hpp
 * Author: jolo
 *
 * Created on 12. Oktober 2011, 14:04
 */

#ifndef WIDGETS_TREE_VIEW_CONTEXT_MENU_HPP
#define	WIDGETS_TREE_VIEW_CONTEXT_MENU_HPP

#include "menu.hpp"

class QAction;

namespace widgets
{
    class tree_view;
    class tree_model;
    class entity_item;
    
    class tree_view_context_menu : public menu
    {
        Q_OBJECT
    public:
        tree_view_context_menu(tree_view* v, tree_model* m, entity_item* itm);
        virtual ~tree_view_context_menu();

    signals:
        void create_request(widgets::entity_item* i);
        void edit_request(widgets::entity_item* i);
        void delete_request(widgets::entity_item* i);

    public slots:
        void on_create_request();
        void on_edit_request();
        void on_delete_request();
        
    private:
        tree_view* v_;
        tree_model* m_;
        entity_item* itm_;
        
        QAction* create_a_;
        QAction* edit_a_;
        QAction* delete_a_;
    };
}

#endif	/* TREE_VIEW_CONTEXT_MENU_HPP */

